define("app/src/setting/main", ["lib/jquery-lib", "lib/util", "lib/artDialog/jquery-artDialog", "../../common/core", "../../tpl/copyright.html", "../../tpl/search.html", "../../tpl/search_list.html", "../../tpl/upload.html", "./setting", "./fav", "./group", "./member", "./system"],
function(e) {
	e("lib/jquery-lib"),
	e("lib/util"),
	e("lib/artDialog/jquery-artDialog"),
	core = e("../../common/core"),
	Setting = e("./setting"),
	Fav = e("./fav"),
	Group = e("./group"),
	Member = e("./member"),
	System = e("./system"),
	Setting.init(),
	Fav.bindEvent(),
	Member.bindEvent(),
	Group.bindEvent(),
	System.bindEvent()
}),
define("app/common/core", [],
function(require, exports) {
	return {
		filetype: {
			image: ["jpg", "jpeg", "png", "bmp", "gif", "ico"],
			music: ["mp3", "wma", "wav", "mid", "m4a", "aac", "midi"],
			movie: ["avi", "flv", "f4v", "wmv", "3gp", "mp4", "wmv", "asf", "m4v", "mov", "mpg"],
			doc: ["doc", "docx", "docm", "xls", "xlsx", "xlsb", "xlsm", "ppt", "pptx", "pptm"],
			text: ["oexe", "inc", "inf", "csv", "log", "asc", "tsv"],
			code: ["abap", "abc", "as", "ada", "adb", "htgroups", "htpasswd", "conf", "htaccess", "htgroups", "htpasswd", "asciidoc", "asm", "ahk", "bat", "cmd", "c9search_results", "cpp", "c", "cc", "cxx", "h", "hh", "hpp", "cirru", "cr", "clj", "cljs", "CBL", "COB", "coffee", "cf", "cson", "Cakefile", "cfm", "cs", "css", "curly", "d", "di", "dart", "diff", "patch", "Dockerfile", "dot", "dummy", "dummy", "e", "ejs", "ex", "exs", "elm", "erl", "hrl", "frt", "fs", "ldr", "ftl", "gcode", "feature", ".gitignore", "glsl", "frag", "vert", "go", "groovy", "haml", "hbs", "handlebars", "tpl", "mustache", "hs", "hx", "html", "htm", "xhtml", "erb", "rhtml", "ini", "cfg", "prefs", "io", "jack", "jade", "java", "js", "jsm", "json", "jq", "jsp", "jsx", "jl", "tex", "latex", "ltx", "bib", "lean", "hlean", "less", "liquid", "lisp", "ls", "logic", "lql", "lsl", "lua", "lp", "lucene", "Makefile", "GNUmakefile", "makefile", "OCamlMakefile", "make", "md", "markdown", "mask", "matlab", "mel", "mc", "mush", "mysql", "nix", "m", "mm", "ml", "mli", "pas", "p", "pl", "pm", "pgsql", "php", "phtml", "ps1", "praat", "praatscript", "psc", "proc", "plg", "prolog", "properties", "proto", "py", "r", "Rd", "Rhtml", "rb", "ru", "gemspec", "rake", "Guardfile", "Rakefile", "Gemfile", "rs", "sass", "scad", "scala", "scm", "rkt", "scss", "sh", "bash", ".bashrc", "sjs", "smarty", "tpl", "snippets", "soy", "space", "sql", "styl", "stylus", "svg", "tcl", "tex", "txt", "textile", "toml", "twig", "ts", "typescript", "str", "vala", "vbs", "vb", "vm", "v", "vh", "sv", "svh", "vhd", "vhdl", "xml", "rdf", "rss", "wsdl", "xslt", "atom", "mathml", "mml", "xul", "xbl", "xaml", "xq", "yaml", "yml", "htm", "xib", "storyboard", "plist", "csproj"],
			bindary: ["pdf", "bin", "zip", "swf", "gzip", "rar", "arj", "tar", "gz", "cab", "tbz", "tbz2", "lzh", "uue", "bz2", "ace", "exe", "so", "dll", "chm", "rtf", "odp", "odt", "pages", "class", "psd", "ttf", "fla", "7z", "dmg", "iso", "dat", "ipa"]
		},
		ico: function(e) {
			var t = G.static_path + "images/file_16/",
			a = ["folder", "file", "edit", "search", "up", "setting", "appStore", "error", "info", "mp3", "flv", "pdf", "doc", "xls", "ppt", "html", "swf"],
			i = $.inArray(e, a);
			return - 1 == i ? t + "file.png": t + e + ".png"
		},
		contextmenu: function(e) {
			try {
				rightMenu.hidden()
			} catch(t) {}
			var t = e || window.event;
			return t ? t && $(t.target).is("textarea") || $(t.target).is("input") || 0 != $(t.target).parents(".topbar").length || 0 != $(t.target).parents(".edit_body").length || 0 != $(t.target).parents(".aui_state_focus").length ? !0 : !1 : !0
		},
		pathThis: function(e) {
			e = e.replace(/\\/g, "/");
			var t = e.split("/"),
			a = t[t.length - 1];
			if ("" == a && (a = t[t.length - 2]), 0 == a.search("fileProxy")) {
				a = urlDecode(a.substr(a.search("&path=")));
				var t = a.split("/");
				a = t[t.length - 1],
				"" == a && (a = t[t.length - 2])
			}
			return a
		},
		pathFather: function(e) {
			e = e.replace(/\\/g, "/");
			var t = e.lastIndexOf("/");
			return e.substr(0, t + 1)
		},
		pathExt: function(e) {
			e = e.replace(/\\/g, "/"),
			e = e.replace(/\/+/g, "/");
			var t = e.lastIndexOf(".");
			return e = e.substr(t + 1),
			e.toLowerCase()
		},
		path2url: function(e) {
			if ("http" == e.substr(0, 4)) return e;
			if (e = e.replace(/\\/g, "/"), e = e.replace(/\/+/g, "/"), e = e.replace(/\/\.*\//g, "/"), G.is_root && e.substring(0, G.web_root.length) == G.web_root) return G.web_host + e.replace(G.web_root, "");
			var t = G.app_host + "./index.php?s=/admin/explorer/fileProxy&path=" + urlEncode(e);
			return G.share_page !== void 0 && (t = G.app_host + "./index.php?s=/admin/share/fileProxy&user=" + G.user + "&sid=" + G.sid + "&path=" + urlEncode(e)),
			t
		},
		authCheck: function(e, t) {
			return G.is_root ? !0 : AUTH.hasOwnProperty(e) ? AUTH[e] ? !0 : (void 0 == t && (t = LNG.no_permission), core.tips.tips(t, !1), !1) : !0
		},
		ajaxError: function(e) {
			core.tips.close(LNG.system_error, !1);
			var t = e.responseText,
			a = '<div class="ajaxError">' + t + "</div>",
			i = $.dialog.list.ajaxErrorDialog;
			return "<!--user login-->" == t.substr(0, 17) ? (FrameCall.goRefresh(), void 0) : (i ? i.content(a) : $.dialog({
				id: "ajaxErrorDialog",
				padding: 0,
				fixed: !0,
				resize: !0,
				ico: core.ico("error"),
				title: "ajax error",
				content: a
			}), void 0)
		},
		file_get: function(e, t) {
			var a = "./index.php?s=/admin/editor/fileGet&filename=" + urlEncode2(e);
			G.share_page !== void 0 && (a = "./index.php?s=/admin/share/fileGet&user=" + G.user + "&sid=" + G.sid + "&filename=" + urlEncode2(e)),
			$.ajax({
				url: a,
				dataType: "json",
				beforeSend: function() {
					core.tips.loading(LNG.loading)
				},
				error: core.ajaxError,
				success: function(e) {
					core.tips.close(LNG.success),
					"function" == typeof t && t(e.data.content)
				}
			})
		},
		setting: function(e) {
			void 0 == e && (e = G.is_root ? "system": "user"),
			void 0 == window.top.frames.Opensetting_mode ? $.dialog.open("./index.php?s=/admin/setting#" + e, {
				id: "setting_mode",
				fixed: !0,
				ico: core.ico("setting"),
				resize: !0,
				title: LNG.setting,
				width: 960,
				height: 580
			}) : ($.dialog.list.setting_mode.display(!0), FrameCall.top("Opensetting_mode", "Setting.setGoto", '"' + e + '"'))
		},
		copyright: function() {
			var e = require("../tpl/copyright.html"),
			t = template.compile(e),
			a = t({
				LNG: LNG,
				G: G
			});
			$.dialog({
				id: "copyright_dialog",
				bottom: 0,
				right: 0,
				simple: !0,
				resize: !1,
				title: LNG.about + " kod",
				width: 425,
				padding: "0",
				fixed: !0,
				content: a
			})
		},
		appStore: function() {
			$.dialog.open("./index.php?app", {
				id: "app_store",
				fixed: !0,
				ico: core.ico("appStore"),
				resize: !0,
				title: LNG.app_store,
				width: 900,
				height: 550
			})
		},
		openIE: function(e) {
			$.dialog.open(e, {
				fixed: !0,
				resize: !0,
				title: LNG.app_store,
				width: "80%",
				height: "70%"
			})
		},
		openApp: function(app) {
			if ("url" == app.type) {
				var icon = app.icon; - 1 == app.icon.search(G.static_path) && "http" != app.icon.substring(0, 4) && (icon = G.static_path + "images/app/" + app.icon),
				"number" != typeof app.width && -1 == app.width.search("%") && (app.width = parseInt(app.width)),
				"number" != typeof app.height && -1 == app.height.search("%") && (app.height = parseInt(app.height)),
				$.dialog.open(app.content, {
					title: app.name,
					fixed: !0,
					ico: icon,
					resize: app.resize,
					simple: app.simple,
					title: app.name.replace(".oexe", ""),
					width: app.width,
					height: app.height
				})
			} else {
				var exec = app.content;
				eval("{" + exec + "}")
			}
		},
		explorer: function(e, t) {
			void 0 == e && (e = ""),
			void 0 == t && (t = core.pathThis(e));
			var a = "./index.php?/explorer&type=iframe&path=" + e;
			G.share_page !== void 0 && (a = "./index.php?s=/admin/share/folder&type=iframe&user=" + G.user + "&sid=" + G.sid + "&path=" + e),
			$.dialog.open(a, {
				resize: !0,
				fixed: !0,
				ico: core.ico("folder"),
				title: t,
				width: 880,
				height: 550
			})
		},
		explorerCode: function(e) {
			void 0 == e && (e = "");
			var t = "./index.php?s=/admin/editor&project=" + e;
			G.share_page !== void 0 && (t = "./index.php?s=/admin/share/code_read&user=" + G.user + "&sid=" + G.sid + "&project=" + e),
			$.dialog.open(t, {
				resize: !0,
				fixed: !0,
				ico: core.ico("folder"),
				title: core.pathThis(e),
				width: "80%",
				height: "70%"
			})
		},
		setSkin_finished: function() {
			var e = $(".setSkin_finished").attr("src");
			e && ($("#link_css_list").attr("href", e), $(".setSkin_finished").remove())
		},
		setSkin: function(e, t) {
			var a = G.static_path + "style/skin/" + e + t;
			$("body").append('<img src="' + a + '" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')
		},
		editorFull: function() {
			var e = $("iframe[name=OpenopenEditor]");
			e.toggleClass("frame_fullscreen")
		},
		language: function(e) {
			Cookie.set("kod_user_language", e, 8760),
			window.location.reload()
		},
		tips: {
			topHeight: function() {
				return "undefined" != typeof Global && Global.topbar_height ? Global.topbar_height: 0
			},
			loading: function(e) {
				Tips.loading(e, "info", core.tips.topHeight())
			},
			close: function(e, t) {
				"object" == typeof e ? Tips.close(e.data, e.code, core.tips.topHeight()) : Tips.close(e, t, core.tips.topHeight())
			},
			tips: function(e, t) {
				"object" == typeof e ? Tips.tips(e.data, e.code, core.tips.topHeight()) : Tips.tips(e, t, core.tips.topHeight())
			}
		},
		fullScreen: function() {
			"true" == $("body").attr("fullScreen") && core.exitfullScreen(),
			$("body").attr("fullScreen", "true");
			var e = document.documentElement;
			e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullScreen && e.webkitRequestFullScreen()
		},
		exitfullScreen: function() {
			$("body").attr("fullScreen", "false"),
			document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen()
		},
		createFlash: function(e, t, a) {
			var i = '<object type="application/x-shockwave-flash" id="' + a + '" data="' + e + '" width="100%" height="100%">' + '<param name="movie" value="' + e + '"/>' + '<param name="allowfullscreen" value="true" />' + '<param name="allowscriptaccess" value="always" />' + '<param name="flashvars" value="' + t + '" />' + '<param name="wmode" value="transparent" />' + "</object>";
			return i
		},
		search: function(e, t) {
			var a, i, n = require("../tpl/search.html"),
			s = require("../tpl/search_list.html"),
			o = function() {
				var s = template.compile(n);
				0 == $(".dialog_do_search").length ? (l(), i = {
					search: e,
					path: t,
					is_content: void 0,
					is_case: void 0,
					ext: "",
					LNG: LNG
				},
				a = $.dialog({
					id: "dialog_do_search",
					padding: 0,
					fixed: !0,
					ico: core.ico("search"),
					resize: !0,
					title: LNG.search,
					width: 450,
					content: s(i)
				}), c(i), $("#search_ext").tooltip({
					placement: "bottom",
					html: !0
				}), $("#search_path").tooltip({
					placement: "bottom",
					html: !0,
					title: function() {
						return $("#search_path").val()
					}
				})) : ($("#search_value").val(e), $("#search_path").val(t), r(), $.dialog.list.dialog_do_search.display(!0))
			},
			r = function() {
				i = {
					search: $("#search_value").val(),
					path: $("#search_path").val(),
					is_content: $("#search_is_content").attr("checked"),
					is_case: $("#search_is_case").attr("checked"),
					ext: $("#search_ext").val()
				},
				c(i)
			},
			l = function() {
				$("#search_value").die("keyup").live("keyup",
				function() {
					ui.path.setSearchByStr($(this).val())
				}),
				$("#search_value,#search_ext,#search_path").keyEnter(r),
				$(".search_header a.button").die("click").live("click", r),
				$(".search_result .list .name").die("click").live("click",
				function() {
					var e = $(this).find("a").html(),
					t = $(this).parent().find(".path a").html() + e;
					$(this).parent().hasClass("file") ? ui.pathOpen.open(t) : "explorer" == Config.pageApp ? ui.path.list(t + "/", "tips") : core.explorer(t + "/")
				}),
				$(".search_result .list .path a").die("click").live("click",
				function() {
					var e = $(this).html();
					"explorer" == Config.pageApp ? ui.path.list(e, "tips") : core.explorer(e)
				})
			},
			c = function(e) {
				var t = 150;
				$("#search_value").focus(),
				$(".search_result .list").remove();
				var a = $(".search_result .message td");
				if (!e.search || !e.path) return a.hide().html(LNG.search_info).fadeIn(t),
				void 0;
				if (1 >= e.search.length) return a.hide().html("too short!").fadeIn(t),
				void 0;
				var i = "./index.php?s=/admin/explorer/search";
				G.share_page !== void 0 && (i = "./index.php?s=/admin/share/search&user=" + G.user + "&sid=" + G.sid),
				$.ajax({
					url: i,
					dataType: "json",
					type: "POST",
					data: e,
					beforeSend: function() {
						a.hide().html(LNG.searching + '<img src="' + G.static_path + 'images/loading.gif">').fadeIn(t)
					},
					error: core.ajaxError,
					success: function(e) {
						if (!e.code) return a.hide().html(e.data).fadeIn(t),
						void 0;
						if (0 == e.data.filelist.length && 0 == e.data.folderlist.length) return a.hide().html(LNG.search_null).fadeIn(t),
						void 0;
						a.hide();
						var i = template.compile(s);
						e.data.LNG = LNG,
						$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)
					}
				})
			};
			o()
		},
		server_dwonload: function(e) {
			core.upload_check("explorer:serverDownload");
			var t = $(".download_box"),
			a = t.find("#download_list"),
			i = t.find("input").val();
			if (t.find("input").val(""), !i || "http" != i.substr(0, 4)) return core.tips.tips("url false!", !1),
			void 0;
			var n = UUID(),
			s = '<div id="' + n + '" class="item">' + '<div class="info"><span class="title" tytle="' + i + '">' + core.pathThis(i) + "</span>" + '<span class="size">0b</span>' + '<span class="state">' + LNG.upload_ready + "</span>" + '<a class="remove font-icon icon-remove" href="javascript:void(0)"></a>' + '<div style="clear:both"></div></div></div>';
			a.find(".item").length > 0 ? $(s).insertBefore(a.find(".item:eq(0)")) : a.append(s);
			var o, r, l, c = 0,
			d = $("#" + n),
			p = $("#" + n + " .state").text(LNG.download_ready),
			u = $('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%;text-align:right;"></div></div>').appendTo("#" + n).find(".progress-bar");
			$("#" + n + " .remove").bind("click",
			function() {
				$.get("./index.php?s=/admin/explorer/serverDownload&type=remove&uuid=" + n),
				$(this).parent().parent().slideUp(function() {
					$(this).remove(),
					ui.f5()
				})
			}),
			$.ajax({
				url: "./index.php?s=/admin/explorer/serverDownload&type=download&save_path=" + e + "&url=" + urlEncode2(i) + "&uuid=" + n,
				dataType: "json",
				error: function(e, t, a) {
					core.ajaxError(e, t, a),
					clearInterval(o),
					o = !1,
					clearTimeout(r),
					o = !1,
					u.parent().remove(),
					p.addClass("error").text(LNG.download_error)
				},
				success: function(e) {
					clearInterval(o),
					o = !1,
					clearTimeout(r),
					o = !1,
					e.code ? (ui.f5_callback(function() {
						ui.path.setSelectByFilename(e.info)
					}), p.text(LNG.download_success), $("#" + n + " .info .title").html(e.info)) : p.addClass("error").text(LNG.error),
					u.parent().remove()
				}
			});
			var h = function() {
				$.ajax({
					url: "./index.php?s=/admin/explorer/serverDownload&type=percent&uuid=" + n,
					dataType: "json",
					success: function(e) {
						var t = "",
						a = e.data;
						if (o) {
							if (!e.code) return p.text(LNG.loading),
							void 0;
							if (a) {
								if (a.size = parseFloat(a.size), a.time = parseFloat(a.time), l) {
									var i = (a.size - l.size) / (a.time - l.time);
									if (c > .2 * i) {
										var n = c;
										c = i,
										i = n
									} else c = i;
									t = core.file_size(i) + "/s"
								}
								if (0 == a.length) d.find(".progress-bar").css("width", "100%").text(LNG.loading);
								else {
									var s = 100 * (a.size / a.length);
									d.find(".progress-bar").css("width", s + "%"),
									p.text(parseInt(s) + "%(" + t + ")")
								}
								d.find(".size").text(core.file_size(a.length)),
								l = a
							}
						}
					}
				})
			};
			r = setTimeout(function() {
				h(),
				o = setInterval(function() {
					h()
				},
				1e3)
			},
			100)
		},
		file_size: function(e) {
			if (0 == e) return "0B";
			e = parseFloat(e);
			var t = {
				GB: 1073741824,
				MB: 1048576,
				KB: 1024,
				"B ": 0
			};
			for (var a in t) if (e >= t[a]) return (e / t[a]).toFixed(1) + a;
			return "0B"
		},
		upload_check: function(e) {
			return void 0 == e && (e = "explorer:fileUpload"),
			!G.is_root && AUTH.hasOwnProperty(e) && 1 != AUTH[e] ? (core.tips.tips(LNG.no_permission, !1), void 0) : "*recycle*/" == G.this_path || "*share*/" == G.this_path || "*share*/" == G.this_path || G.json_data && "writeable" != G.json_data.path_type ? (core.tips.tips(LNG.no_permission_write, !1), !1) : !0
		},
		upload: function() {
			G.upload_path = G.this_path;
			var e = urlDecode(G.upload_path);
			if (uploader.option("server", "./index.php?s=/admin/explorer/fileUpload&path=" + urlEncode(G.upload_path)), 30 >= e.length ? e: "..." + e.substr(e.length - 30), 0 != $(".dialog_file_upload").length) return $.dialog.list.dialog_file_upload.display(!0),
			void 0;
			var t = require("../tpl/upload.html"),
			a = template.compile(t),
			i = WebUploader.Base.formatSize(G.upload_max);
			$.dialog({
				padding: 5,
				resize: !0,
				ico: core.ico("up"),
				id: "dialog_file_upload",
				fixed: !0,
				title: LNG.upload_muti,
				content: a({
					LNG: LNG,
					maxsize: i
				}),
				close: function() {
					$.each(uploader.getFiles(),
					function(e, t) {
						uploader.skipFile(t),
						uploader.removeFile(t)
					})
				}
			}),
			$(".file_upload .tips").tooltip({
				placement: "bottom"
			}),
			$(".file_upload .top_nav a.menu").unbind("click").bind("click",
			function() {
				$(this).hasClass("tab_upload") ? ($(".file_upload .tab_upload").addClass("this"), $(".file_upload .tab_download").removeClass("this"), $(".file_upload .upload_box").removeClass("hidden"), $(".file_upload .download_box").addClass("hidden")) : ($(".file_upload .tab_upload").removeClass("this"), $(".file_upload .tab_download").addClass("this"), $(".file_upload .upload_box").addClass("hidden"), $(".file_upload .download_box").removeClass("hidden"))
			}),
			$(".file_upload .download_box button").unbind("click").bind("click",
			function() {
				core.server_dwonload(G.upload_path)
			}),
			uploader.addButton({
				id: "#picker"
			})
		},
		upload_init: function() {
			var e = "#thelist",
			t = !0;
			$.browser.msie && (t = !1);
			var a = 10485760;
			a >= G.upload_max && (a = .8 * G.upload_max),
			uploader = WebUploader.create({
				swf: G.static_path + "js/lib/webuploader/Uploader.swf",
				dnd: "body",
				threads: 2,
				compress: !1,
				resize: !1,
				prepareNextFile: !0,
				duplicate: !0,
				chunked: t,
				chunkRetry: 3,
				chunkSize: a
			}),
			$("#uploader .success").die("click").live("click",
			function() {
				var e = $(this).find("span.title").attr("title");
				"explorer" == Config.pageApp ? ui.path.list(core.pathFather(e), "tips",
				function() {
					ui.path.setSelectByFilename(core.pathThis(e))
				}) : core.explorer(core.pathFather(e))
			}),
			$("#uploader .open").die("click").live("click",
			function(e) {
				var t = $(this).find("span.title").attr("title");
				ui.pathOpen.open(t),
				stopPP(e)
			}),
			$(".upload_box_clear").die("click").live("click",
			function() {
				$("#thelist .success,#thelist .error").each(function() {
					$(this).slideUp(300,
					function() {
						$(this).remove()
					})
				})
			}),
			$(".upload_box_setting").die("click").live("click",
			function() {
				$(".upload_box_config").toggleClass("hidden")
			}),
			$("#uploader .remove").die("click").live("click",
			function(e) {
				var t = $(this).parent().parent().attr("id");
				uploader.skipFile(t),
				uploader.removeFile(t, !0),
				$(this).parent().parent().slideUp(function() {
					$(this).remove()
				}),
				stopPP(e)
			});
			var i = 0,
			n = 0,
			s = "0B/s",
			o = function(e, t) {
				var a = e.size * t,
				i = 3;
				e.speed === void 0 ? e.speed = [[time() - 500, 0], [time(), a]] : i >= e.speed.length ? e.speed.push([time(), a]) : (e.speed = e.speed.slice(1, i), e.speed.push([time(), a]));
				var n = e.speed[e.speed.length - 1],
				o = e.speed[0],
				r = (n[1] - o[1]) / ((n[0] - o[0]) / 1e3);
				return r = core.file_size(r) + "/s",
				s = r,
				r
			},
			r = [];
			uploader.on("uploadBeforeSend",
			function(e, t) {
				var a = urlEncode(e.file.fullPath); (void 0 == a || "undefined" == a) && (a = ""),
				t.fullPath = a
			}).on("fileQueued",
			function(t) {
				if (!core.upload_check()) return uploader.skipFile(t),
				uploader.removeFile(t),
				void 0;
				var a, n = $(e),
				a = t.fullPath;
				t.finished = !1,
				(void 0 == a || "undefined" == a) && (a = t.name),
				i++,
				$(e).find(".item").length > 0 && (n = $(e).find(".item:eq(0)"));
				var s = '<div id="' + t.id + '" class="item"><div class="info">' + '<span class="title" title="' + G.upload_path + a + '">' + core.pathThis(a) + "</span>" + '<span class="size">' + core.file_size(t.size) + "</span>" + '<span class="state">' + LNG.upload_ready + "</span>" + '<a class="remove font-icon icon-remove" href="javascript:void(0)"></a>' + '<div style="clear:both"></div></div></div>';
				$(e).find(".item").length > 0 ? $(s).insertBefore($(e).find(".item:eq(0)")) : $(e).append(s),
				uploader.upload()
			}).on("uploadProgress",
			function(e, t) {
				$(".dialog_file_upload .aui_title").text(LNG.uploading + ": " + n + "/" + i + " (" + s + ")");
				var a = o(e, t),
				r = $("#" + e.id),
				l = r.find(".progress .progress-bar");
				l.length || (l = $('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),
				r.find(".state").text(parseInt(100 * t) + "%(" + a + ")"),
				l.css("width", 100 * t + "%")
			}).on("uploadAccept",
			function(e, t) {
				e.file.serverData = t;
				try {
					r.push(core.pathThis(t.info))
				} catch(a) {}
			}).on("uploadSuccess",
			function(e) {
				var t = 36 * $("#" + e.id).index(".item");
				$("#uploader").scrollTop(t),
				n++;
				var a = e.serverData;
				if (a.code ? ($("#" + e.id).addClass("success"), $("#" + e.id).find(".state").text(a.data), $("#" + e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")) : ($("#" + e.id).find(".state").addClass("error"), $("#" + e.id).find(".state").text(a.data).attr("title", a.data)), uploader.removeFile(e), $("#" + e.id).find(".progress").fadeOut(), !e.fullPath) {
					var i = r;
					ui.f5_callback(function() {
						ui.path.setSelectByFilename(i)
					})
				}
			}).on("uploadError",
			function(e, t) {
				n++,
				$("#" + e.id).find(".progress").fadeOut(),
				$("#" + e.id).find(".state").addClass("error"),
				$("#" + e.id).find(".state").text(LNG.upload_error + "(" + t + ")")
			}).on("uploadFinished",
			function() {
				$(".dialog_file_upload .aui_title").text(LNG.upload_success + ": " + n + "/" + i),
				i = 0,
				n = 0,
				uploader.reset(),
				"explorer" == Config.pageApp && ui.tree.checkIfChange(G.this_path);
				var e = r;
				ui.f5_callback(function() {
					ui.path.setSelectByFilename(e),
					r = []
				})
			}).on("error",
			function(e) {
				core.tips.tips(e, !1)
			});
			var l;
			inState = !1,
			dragOver = function() {
				0 == inState && (inState = !0, MaskView.tips(LNG.upload_drag_tips)),
				l && window.clearTimeout(l)
			},
			dragLeave = function(e) {
				stopPP(e),
				l && window.clearTimeout(l),
				l = window.setTimeout(function() {
					inState = !1,
					MaskView.close()
				},
				100)
			},
			dragDrop = function(e) {
				try {
					if (e = e.originalEvent || e, core.upload_check()) {
						var t = e.dataTransfer.getData("text/plain");
						t && "http" == t.substring(0, 4) ? ui.pathOperate.appAddURL(t) : core.upload()
					}
					stopPP(e)
				} catch(e) {}
				inState && (inState = !1, MaskView.close())
			}
		}
	}
}),
define("app/tpl/copyright.html", [], '<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_copyright}}</div>\n	</div>\n	<div class="content">\n		<p>{{#LNG.copyright_desc}}</p>\n		<div>{{#LNG.copyright_contact}}</div>\n		<div>{{#LNG.copyright_info}}</div> \n	</div>\n</div>'),
define("app/tpl/search.html", [], "<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),
define("app/tpl/search_list.html", [], "{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),
define("app/tpl/upload.html", [], "<div class='file_upload'>\n    <div class='top_nav'>\n       <a href='javascript:void(0);' class='menu this tab_upload'>{{LNG.upload_local}}</a>\n       <a href='javascript:void(0);' class='menu tab_download''>{{LNG.download_from_server}}</a>\n       <div style='clear:both'></div>\n    </div>\n    <div class='upload_box'>\n        <div class='btns'>\n            <div id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' class='uploader-list'></div>\n        </div>\n    </div>\n    <div class='download_box hidden'>\n        <div class='list'>{{LNG.download_address}}<input type='text' name='url'/>\n        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),
define("app/src/setting/setting", [],
function() {
	var e, t = function(e) {
		core.setSkin(e, "app_setting.css"),
		FrameCall.father("ui.setTheme", '"' + e + '"')
	},
	a = function(e) {
		core.setSkin(e, "app_setting.css")
	},
	i = function(t) { ("" == t || void 0 == t) && (t = "user"),
		e = t,
		"fav&" == t.substring(0, 4) && (t = "fav"),
		$(".selected").removeClass("selected"),
		$("ul.setting li#" + t).addClass("selected"),
		window.location.href = "#" + t,
		$.ajax({
			url: "./index.php?s=/admin/setting/slider&slider=" + t,
			beforeSend: function() {
				$(".main").html("<img src='"+G.static_path+"images/loading.gif' />")
			},
			success: function(a) {
				$(".main").css("display", "none"),
				$(".main").html(a),
				$(".main").fadeIn("fast"),
				"fav" == t && Fav.init(e),
				"member" == t && Group.init(),
				e = t
			}
		})
	},
	n = function() {
		G.is_root ? $("ul.setting #system").show() : $("ul.setting #system").hide(),
		G.is_root || 1 == AUTH["member:get"] ? $("ul.setting #member").show() : $("ul.setting #member").hide(),
		e = location.hash.split("#", 2)[1],
		i(e),
		$("ul.setting li").hover(function() {
			$(this).addClass("hover")
		},
		function() {
			$(this).toggleClass("hover")
		}).click(function() {
			e = $(this).attr("id"),
			i(e)
		}),
		$(".box .list").live("hover",
		function() {
			$(this).addClass("listhover")
		},
		function() {
			$(this).toggleClass("listhover")
		}).live("click",
		function() {
			var e = $(this),
			a = e.parent();
			switch (type = a.attr("data-type"), value = e.attr("data-value"), a.find(".this").removeClass("this"), e.addClass("this"), type) {
			case "wall":
				var i = G.static_path + "images/wall_page/" + value + ".jpg";
				FrameCall.father("ui.setWall", '"' + i + '"');
				break;
			case "theme":
				t(value);
				break;
			case "musictheme":
				FrameCall.father("CMPlayer.changeTheme", '"music","' + value + '"');
				break;
			case "movietheme":
				FrameCall.father("CMPlayer.changeTheme", '"movie","' + value + '"');
				break;
			default:
			}
			var n = "index.php?setting/set&k=" + type + "&v=" + value;
			$.ajax({
				url: n,
				type: "json",
				success: function(e) {
					e.code ? tips(e) : core.authCheck("setting:set") ? tips(LNG.config_save_error_file, !1) : tips(LNG.config_save_error_auth, !1)
				}
			})
		})
	},
	s = function() {//修改密码
		var e = $(".selected").attr("id");
		switch (e) {
		case "user":
			var get_password_old = $("#password_old").val(),
				get_password = $("#password").val(),
				get_repassword = $("#repassword").val();

			if ("" == get_password_old || "" == get_password) {
				tips(LNG.password_not_null, "error");
				break
			}

			$.ajax({
				url: "./index.php?s=/admin/User/submitPassword",
				data: {old:get_password_old,password:get_password,repassword:get_repassword},
				type: "POST",
				dataType: "json",
				success: function(data) {
					tips(data.info),
					data.status && (window.top.location.href = "./index.php?s=/admin/Public/logout")
				}
			})

			break;
		case "wall":
			var i = $("#wall_url").val();
			if ("" == i) {
				tips(LNG.picture_can_not_null, "error");
				break
			}
			FrameCall.father("ui.setWall", '"' + i + '"'),
			$(".box").find(".this").removeClass("this");
			var n = "./index.php?s=/admin/setting/set&k=wall&v=" + urlEncode(i);
			$.ajax({
				url: n,
				type: "json",
				success: function(e) {
					tips(e)
				}
			});
		default:
		}
	};
	return {
		init:
		n,
		setGoto: i,
		tools: s,
		setThemeSelf: a,
		setTheme: t
	}
}),
define("app/src/setting/fav", [],
function() {
	var e = "./index.php?s=/admin/fav/",
	t = function(t) {
		var a;
		$.ajax({
			url: e + "get",
			dataType: "json",
			async: !1,
			success: function(e) {
				return e.code ? (a = e.data, void 0) : (tips(e), void 0)
			},
			error: function() {
				return ! 1
			}
		});
		var i = "<tr class='title'><td class='name'>" + LNG.name + "<span>(" + LNG.can_not_repeat + ")</span></td>" + "<td class='path'>" + LNG.address + "<span>(" + LNG.absolute_path + ")</span></td>" + "<td class='action'>" + LNG.action + "</td>" + "</tr>";
		for (var n in a) i += "<tr class='favlist' name='" + a[n].name + "' path='" + a[n].path + "'>" + "   <td class='name'><input type='text' id='sname' value='" + a[n].name + "' /></td>" + "   <td class='path'><input type='text' id='spath' value='" + a[n].path + "' /></td>" + "   <td class='action'>" + "       <a href='javascript:void(0)' onclick='' class='button edit'>" + LNG.button_save_edit + "</a>" + "       <a href='javascript:void(0)' onclick='' class='button del'>" + LNG.button_del + "</a>" + "   </td>" + "</tr>";
		if ($("table#list").html(i), "fav&" == t.substring(0, 4)) {
			var s = t.split("&")[1].split("=")[1],
			o = t.split("&")[2].split("=")[1],
			r = "<tr class='favlist' name='' path=''>   <td class='name'><input type='text' id='sname' value='" + urlDecode(s) + "' /></td>" + "   <td class='path'><input type='text' id='spath' value='" + urlDecode(o) + "' /></td>" + "   <td class='action'>" + "       <a href='javascript:void(0)' class='button addsave'>" + LNG.button_save + "</a>" + "       <a href='javascript:void(0)' class='button addexit'>" + LNG.button_cancel + "</a>" + "   </td>" + "</tr>";
			$(r).insertAfter("table#list tr:last")
		}
	},
	a = function() {
		var e = "<tr class='favlist' name='' path=''>   <td class='name'><input type='text' id='sname' value='' /></td>   <td class='path'><input type='text' id='spath' value='' /></td>   <td class='action'>       <a href='javascript:void(0)' class='button addsave'>" + LNG.button_save + "</a>" + "       <a href='javascript:void(0)' class='button addexit'>" + LNG.button_cancel + "</a>" + "   </td>" + "</tr>";
		$(e).insertAfter("table#list tr:last")
	},
	i = function() {
		var e = $(this).parent().parent();
		$(e).detach()
	},
	n = function() {
		var t = $(this).parent().parent(),
		a = $(t).find("#sname").val(),
		i = $(t).find("#spath").val();
		return "" == a || "" == i ? (tips(LNG.not_null, "error"), !1) : ($.ajax({
			url: e + "add&name=" + a + "&path=" + i,
			dataType: "json",
			success: function(e) {
				if (tips(e), e.code) {
					$(t).attr("name", a),
					$(t).attr("path", i);
					var n = "<a href='javascript:void(0)' class='button edit'>" + LNG.button_save_edit + "</a>&nbsp;" + "<a href='javascript:void(0)' class='button del'>" + LNG.button_del + "</a>";
					$(t).find("td.action").html(n),
					FrameCall.father("ui.tree.init", '""')
				}
			}
		}), void 0)
	},
	s = function() {
		var t = $(this).parent().parent(),
		a = $(t).attr("name"),
		i = $(t).find("#sname").val(),
		n = $(t).find("#spath").val();
		return "" == i || "" == n ? (tips(LNG.not_null, "error"), !1) : ($.ajax({
			dataType: "json",
			url: e + "edit&name=" + a + "&name_to=" + i + "&path_to=" + n,
			success: function(e) {
				tips(e),
				e.code && ($(t).attr("name", i), FrameCall.father("ui.tree.init", '""'))
			}
		}), void 0)
	},
	o = function() {
		var t = $(this).parent().parent(),
		a = $(t).attr("name");
		$.ajax({
			url: e + "del&name=" + a,
			dataType: "json",
			async: !1,
			success: function(e) {
				tips(e),
				e.code && ($(t).detach(), FrameCall.father("ui.tree.init", '""'))
			}
		})
	},
	r = function() {
		$(".fav a.add").live("click", a),
		$(".fav a.addexit").live("click", i),
		$(".fav a.addsave").live("click", n),
		$(".fav a.edit").live("click", s),
		$(".fav a.del").live("click", o)
	};
	return {
		init: t,
		bindEvent: r
	}
}),
define("app/src/setting/group", [],
function() {
	var e = "index.php?group/",
	t = {},
	a = function() {
		$.ajax({
			url: e + "get",
			dataType: "json",
			async: !1,
			success: function(e) {
				if (!e.code) return tips(e),
				void 0;
				var a = e.data;
				t = {};
				for (var n in a) t[a[n].role] = a[n];
				i(),
				Member.init()
			},
			error: function() {
				return ! 1
			}
		}),
		$(".group_editor .path_ext_tips").tooltip({
			placement: "bottom",
			html: !0
		}),
		$(".group_editor .warning").tooltip({
			placement: "bottom",
			html: !0,
			title: function() {
				return $(".group_tips").html()
			}
		})
	},
	i = function() {
		var e = "<tr class='title'><td width='20%'>" + LNG.group + "</td>" + "<td width=''>" + LNG.name + "</td>" + "<td width='35%'>" + LNG.action + "</td>" + "</tr>";
		for (var a in t) {
			var i = "<a href='javascript:void(0)' class='button edit'>" + LNG.button_edit + "</a>" + "<a href='javascript:void(0)' class='button del'> " + LNG.button_del + "</a>";
			"root" == t[a].role && (i = LNG.default_group_can_not_do),
			e += "<tr role='" + t[a].role + "'>" + "   <td>" + t[a].role + "</td>" + "   <td>" + t[a].name + "</td><td>" + i + "</td>"
		}
		$(".group table#list").html(e)
	},
	n = function() {
		l($(".nav .group_status")),
		$(".group_editor #role").val("").focus(),
		$(".group_editor #name").val(""),
		$(".group_editor #ext_not_allow").val($(".group_editor #ext_not_allow").attr("default")),
		$(".group_editor .tag").removeClass("this"),
		$(".group_editor input").removeAttr("checked"),
		$(".group_editor .edit_save").addClass("hidden"),
		$(".group_editor .edit_exit").addClass("hidden"),
		$(".group_editor .add_save").removeClass("hidden"),
		$(".nav .group_status").html(LNG.setting_group_add)
	},
	s = function(e) {
		var a;
		a = t[e],
		$(".group_editor .tag").removeClass("this"),
		$(".group_editor input").removeAttr("checked"),
		$(".group_editor .edit_save").removeClass("hidden"),
		$(".group_editor .edit_exit").removeClass("hidden"),
		$(".group_editor .add_save").addClass("hidden"),
		$(".nav .group_status").html(LNG.setting_group_edit),
		l($(".nav .group_status")),
		$(".group_editor #role").val(a.role).attr("data-before", a.role),
		$(".group_editor #name").val(a.name),
		$(".group_editor #ext_not_allow").val(a.ext_not_allow),
		$(".group_editor .tag").each(function() {
			var e = $(this),
			t = e.attr("data-role");
			t = t.split(";"),
			t = t[0],
			a[t] && (e.addClass("this"), e.find("input").attr("checked", !0))
		})
	},
	o = function() {
		var t = $(".group_editor #role").val(),
		i = $(".group_editor #name").val(),
		s = $(".group_editor #ext_not_allow").val(),
		o = {},
		r = "",
		l = "add";
		if (void 0 == s && (s = ""), "" == t || "" == i) return tips(LNG.not_null, "error"),
		!1;
		if (escape(t).indexOf("%u") >= 0) return tips("名称不能为中文！", "warning"),
		!1;
		if ($(".group_editor .tag.this").each(function() {
			for (var e = $(this).attr("data-role").split(";"), t = 0; e.length > t; t++) o[e[t]] = 1
		}), $(".group_editor .add_save").hasClass("hidden")) {
			l = "edit";
			var c = $(".group_editor #role").attr("data-before");
			r = "edit&role_old=" + c + "&role=" + t + "&name=" + i + "&ext_not_allow=" + s
		} else r = "add&role=" + t + "&name=" + i + "&ext_not_allow=" + s;
		$.ajax({
			url: e + r,
			data: o,
			type: "POST",
			dataType: "json",
			success: function(e) {
				tips(e),
				e.code && (a(), "add" == l && n())
			}
		})
	},
	r = function() {
		var t = $(this).parent().parent(),
		i = $(t).attr("role");
		$.dialog({
			fixed: !0,
			icon: "question",
			drag: !0,
			title: LNG.warning,
			content: LNG.if_remove + i + "?<br/>" + LNG.group_remove_tips,
			ok: function() {
				$.ajax({
					url: e + "del&role=" + i,
					async: !1,
					dataType: "json",
					success: function(e) {
						tips(e),
						e.code && ($(t).detach(), a(), l($(".nav a:eq(1)")))
					}
				})
			},
			cancel: !0
		})
	},
	l = function(e) {
		$(".nav .this").removeClass("this"),
		e.addClass("this");
		var t = e.attr("data-page");
		$(".section").addClass("hidden"),
		$("." + t).removeClass("hidden")
	},
	c = function() {
		$(".group a.add").live("click", n),
		$(".group a.del").live("click", r),
		$(".group a.edit").live("click",
		function() {
			var e = $(this).parent().parent();
			s(e.attr("role"))
		}),
		$(".group_editor a.add_save").live("click", o),
		$(".group_editor a.edit_save").live("click", o),
		$(".group_editor a.edit_exit").live("click", n),
		$(".group_editor a.revert").live("click",
		function() {
			$(".group_editor .tag").each(function() {
				$(this).hasClass("this") ? ($(this).removeClass("this"), $(this).find("input").removeAttr("checked")) : ($(this).addClass("this"), $(this).find("input").attr("checked", !0))
			}),
			$(".group_editor .combox:eq(0) .tag:eq(0)").hasClass("this") || ($(".group_editor .combox:eq(0) .tag").removeClass("this"), $(".group_editor .combox:eq(0) .tag").find("input").removeAttr("checked")),
			$(".group_editor .combox:eq(1) .tag:eq(0)").hasClass("this") || ($(".group_editor .combox:eq(1) .tag").removeClass("this"), $(".group_editor .combox:eq(1) .tag").find("input").removeAttr("checked"))
		}),
		$(".nav a").live("click",
		function() {
			l($(this))
		}),
		$(".group_editor .tag").live("click",
		function() {
			var e = $(this);
			if (select = !1, e.toggleClass("this"), e.hasClass("this") ? (select = !0, e.find("input").attr("checked", !0)) : (select = !1, e.find("input").removeAttr("checked")), e.parent().hasClass("combox")) {
				var t = e.index();
				1 == t && 0 == select && (e.parent().find(".tag").removeClass("this"), e.parent().find("input").removeAttr("checked")),
				1 != t && 1 == select && (e.parent().find(".tag:eq(0)").addClass("this"), e.parent().find("input:eq(0)").attr("checked", !0))
			}
		})
	},
	d = function() {
		return t
	};
	return {
		getData: d,
		edit: s,
		init: a,
		bindEvent: c
	}
}),
define("app/src/setting/member", [],
function() {
	var e, t = "./index.php?s=/admin/member/",
	a = "",
	i = {},
	n = function() {
		i = Group.getData(),
		$.ajax({
			url: t + "get",
			dataType: "json",
			async: !1,
			success: function(t) {
				return t.code ? (e = t.data, s(), void 0) : (tips(t), void 0)
			},
			error: function() {
				return ! 1
			}
		})
	},
	s = function() {
		var t = "<tr class='title'><td width=''>" + LNG.username + "</td>" + "<td width='25%'>" + LNG.group_name + "</td>" + "<td width='35%'>" + LNG.action + "</td>" + "</tr>",
		n = objectKeys(i);
		a = "";
		for (var s = n.length - 1; s >= 0; s--) {
			var r = i[n[s]];
			a += "<option value='" + r.role + "'>" + r.name + "</option>"
		}
		for (var s in e) t += o(e[s].name, e[s].role);
		$(".member table#list").html(t)
	},
	o = function(e, t) {
		void 0 == e && (e = ""),
		void 0 == t && (t = "");
		var a;
		i[t] ? a = i[t].name: (a = LNG.group_not_exists, t = "");
		var n = "<a href='javascript:void(0)' class='button folder'>" + LNG.address + "</a>  " + "<a href='javascript:void(0)' class='button edit'>" + LNG.button_edit + "</a>  " + "<a href='javascript:void(0)' class='button del'>" + LNG.button_del + "</a>";
		"admin" == e && (n = LNG.default_group_can_not_do);
		var s = "<tr name='" + urlDecode(e) + "' role='" + t + "'>" + "   <td>" + e + "</td>" + "   <td><a href='javascript:void(0)' class='edit_role'>" + a + "</a></td>" + "   <td>" + n + "</td>" + "</tr>";
		return s
	},
	r = function(e, t, i) {
		void 0 == t && (t = ""),
		void 0 == i && (i = "");
		var n = "";
		n = "add" == e ? {
			b1: "add_save'>" + LNG.member_add,
			b2: "add_exit'>" + LNG.button_cancel
		}: {
			b1: "edit_save'>" + LNG.button_save_edit,
			b2: "edit_exit'>" + LNG.button_cancel
		};
		var s = "<tr name='" + t + "' role='" + i + "'>" + "   <td class='member'>" + LNG.username + ":<input type='text' id='name' value='" + t + "'/>" + "       <span>" + LNG.password + ":</span><input type='text' id='password'/></td>" + "   <td><select id='role' value='" + i + "'>" + a + "</select></td>" + "   <td>" + "       <a href='javascript:void(0)' class='button " + n.b1 + "</a>" + "       <a href='javascript:void(0)' class='button " + n.b2 + "</a>" + "   </td>" + "</tr>";
		return s
	},
	l = function() {
		var e = r("add");
		$(e).insertAfter(".member table#list tr:last")
	},
	c = function() {
		var e = $(this).parent().parent();
		$(e).detach()
	},
	d = function() {
		var e = $(this).parent().parent(),
		a = urlEncode($(e).find("#name").val()),
		i = urlEncode($(e).find("#password").val()),
		n = $(e).find("#role").val();
		return "" == a || "" == i || "" == n ? (tips(LNG.not_null, "warning"), !1) : ($.ajax({
			url: t + "add&name=" + a + "&password=" + i + "&role=" + n,
			dataType: "json",
			success: function(t) {
				if (tips(t), t.code) {
					var i = o(a, n);
					$(i).insertAfter(e),
					$(e).detach()
				}
			}
		}), void 0)
	},
	p = function() {
		var e = $(this).parent().parent(),
		t = r("edit", $(e).attr("name"), $(e).attr("role"));
		$(".info").html(LNG.password_null_not_update).fadeIn(100),
		$(t).insertAfter(e);
		var a = $(e).attr("role");
		$(e).next().find("option[value=" + a + "]").attr("selected", "true"),
		$(e).detach()
	},
	u = function() {
		var e = $(this).parent().parent(),
		t = o($(e).attr("name"), $(e).attr("role"));
		$(t).insertAfter(e),
		$(e).detach(),
		$(".info").fadeOut(100)
	},
	h = function() {
		var e = $(this).parent().parent(),
		a = urlEncode($(e).attr("name")),
		i = urlEncode($(e).find("#name").val()),
		n = $(e).find("#role").val(),
		s = urlEncode($(e).find("#password").val());
		if ("" == i || "" == n) return tips(LNG.not_null, "error"),
		!1;
		var r = "";
		"" != s && (r = "&password_to=" + s),
		$.ajax({
			url: t + "edit&name=" + a + "&name_to=" + i + "&role_to=" + n + r,
			dataType: "json",
			success: function(t) {
				if (tips(t), t.code) {
					var a = o(i, n);
					$(a).insertAfter(e),
					$(e).detach(),
					$(".info").fadeOut(100)
				}
			}
		})
	},
	f = function() {
		var e = $(this).parent().parent(),
		a = $(e).attr("name");
		$.dialog({
			fixed: !0,
			icon: "question",
			drag: !0,
			title: LNG.warning,
			content: LNG.if_remove + a + "<br/>" + LNG.member_remove_tips,
			ok: function() {
				$.ajax({
					url: t + "del&name=" + a,
					dataType: "json",
					async: !1,
					success: function(t) {
						tips(t),
						t.code && $(e).detach()
					}
				})
			},
			cancel: !0
		})
	},
	m = function() {
		$(".member a.add").live("click", l),
		$(".member a.add_exit").live("click", c),
		$(".member a.add_save").live("click", d),
		$(".member a.edit").live("click", p),
		$(".member a.edit_save").live("click", h),
		$(".member a.edit_exit").live("click", u),
		$(".member a.del").live("click", f),
		$(".member a.folder").live("click",
		function() {
			var e = $(this).parent().parent().attr("name");
			core.explorer(G.basic_path + "data/User/" + e + "/home/")
		}),
		$(".member a.edit_role").live("click",
		function() {
			var e = $(this).parent().parent().attr("role");
			return "" == e ? (tips(LNG.group_already_remove, !1), void 0) : (Group.edit(e), void 0)
		})
	};
	return {
		init: n,
		bindEvent: m
	}
}),
define("app/src/setting/system", [],
function() {
	var e = function() {
		$("input[name='first_in']").live("click",
		function() {
			$("input[name='first_in']").removeAttr("checked"),
			$(this).attr("checked", "checked")
		}),
		$(".system_save").live("click",
		function() {
			var e = {};
			$(".system_setting .box_line input").each(function() {
				var t = $(this);
				if ("checkbox" == t.attr("type")) {
					var a = void 0 == t.attr("checked") ? "0": "1";
					e[t.attr("name")] = a
				} else "radius" != t.attr("type") && (e[t.attr("name")] = urlEncode(t.val()))
			}),
			e.first_in = $("input[name='first_in'][checked]").val(),
			a(e)
		}),
		t(),
		$(".path_ext_tips").die("click").live("click",
		function() {
			art.dialog.open("./index.php?s=/admin/setting/php_info", {
				title: "php_info",
				width: "70%",
				height: "65%",
				resize: !0
			})
		})
	},
	t = function() {
		$('.setting_menu .menu_list input[name="target"]').live("click",
		function() {
			"_blank" == $(this).val() ? ($(this).val("_self"), $(this).removeAttr("checked")) : ($(this).val("_blank"), $(this).attr("checked", "checked"))
		}),
		$(".system_menu_add").live("click",
		function() {
			var e = $(".menu_default").clone().removeClass("menu_default hidden").addClass("menu_list");
			e.insertAfter(".setting_menu .menu_list:last")
		}),
		$(".setting_menu .menu_list .move_up").live("click",
		function() {
			var e = $(this).parent().parent();
			e.prev().hasClass("menu_list") && e.insertBefore(e.prev())
		}),
		$(".setting_menu .menu_list .move_down").live("click",
		function() {
			var e = $(this).parent().parent();
			e.next().hasClass("menu_list") && e.insertAfter(e.next())
		}),
		$(".setting_menu .menu_list .move_hidden").live("click",
		function() {
			var e = $(this).parent().parent();
			e.hasClass("menu_hidden") ? (e.removeClass("menu_hidden"), $(this).text(LNG.menu_hidden)) : (e.addClass("menu_hidden"), $(this).text(LNG.menu_show))
		}),
		$(".setting_menu .menu_list .move_del").live("click",
		function() {
			var e = $(this).parent().parent();
			e.remove()
		}),
		$(".system_menu_save").live("click",
		function() {
			var e = [];
			$(".setting_menu .menu_list").each(function() {
				var t = $(this),
				a = {};
				t.hasClass("menu_default") || (t.find("input").each(function() {
					a[$(this).attr("name")] = urlEncode($(this).attr("value"))
				}), "" != a.name && (a.use = "1", a.type = "", t.hasClass("menu_hidden") && (a.use = "0"), t.hasClass("menu_system") && (a.type = "system"), e.push(a)))
			}),
			a({
				menu: e
			})
		})
	},
	a = function(e) {
		$.ajax({
			url: "./index.php?s=/admin/setting/system_setting",
			type: "POST",
			data: "data=" + urlEncode(json_encode(e)),
			dataType: "json",
			success: function(e) {
				tips(e)
			}
		})
	};
	return {
		bindEvent: e
	}
});